<template>
  <input type="text" name="price" v-model="price">
  <input type="text" name="number" v-model="num">
  <br>
  <label>总价:{{ total }}</label>
</template>
<script setup>
import { ref, computed } from 'vue';
let price = ref(0)
let num = ref(0)
let total = ref(0)
total.value = computed(() => {
  return price.value * num.value
})

</script>